package limedia.sdk.api.realtime;

import java.util.concurrent.SynchronousQueue;

import com.limedia.explorer.constant.Constant;
import com.limedia.explorer.enums.Enums;
import com.limedia.explorer.enums.Enums.TSEDecodeType;
/**
 * Play data transfer object
 * @author ThunderSoft
 *
 */
public class TSPlayerDTO {
	// Array blocking queue used for receiving data from RTP server
    private final SynchronousQueue<TSPcmData> pcmQueueForVideo = new SynchronousQueue<TSPcmData>();
    private final SynchronousQueue<TSPcmData> pcmQueueForAudio = new SynchronousQueue<TSPcmData>();
    // Data port number
//    private String videoDecodeType = Constant.VIDEO_DECODER_TYPE_H264;
    private int videoW = Enums.VideoWidth.VIDEO_W_720P.getInt();//resolution width
    private int videoH = Enums.VideoHeight.VIDEO_H_720P.getInt();
    private int videoFrameRate = Constant.VIDEO_FRAME_RATE_30;//
    private int videoBitRate = Constant.VIDEO_BIT_RATE_DEFAULT;
    private TSEDecodeType videoDecodeType = TSEDecodeType.H264;
    private byte[] SPSPPSData = null;
    
    public TSPlayerDTO() {
    	super();
    }
    /**
     * get Array blocking queue used for receiving data from RTP server
     * @return Array blocking queue used for receiving data from RTP server
     */
	public SynchronousQueue<TSPcmData> getPcmQueueForVideo() {
		return pcmQueueForVideo;
	}
	
	public SynchronousQueue<TSPcmData> getPcmQueueForAudio() {
		return pcmQueueForAudio;
	}

	/**
	 * get android media codec type(H265)
	 * @return android media codec type(H265)
	 */
//	public String getDecoderType() {
//		return videoDecodeType;
//	}
	
	/**
	 * width resolution
	 * @return width resolution
	 */
	public int getVideoW() {
		return videoW;
	}
	
	/**
	 * height resolution
	 * @return height resolution
	 */
	public int getVideoH() {
		return videoH;
	}
	
	/**
	 * get video frame rate
	 * @return video frame rate
	 */
	public int getVideoFrameRate() {
		return videoFrameRate;
	}
	
	/**
	 * get video bit rate 
	 * @return video bit rate 
	 */
	public int getVideoBitRate() {
		return videoBitRate;
	}
	
	/**
	 * get default decode type
	 * @return default decode type
	 */
	public TSEDecodeType getDecodeType() {
		return videoDecodeType;
	}
	/**
	 * ge sps and pps data
	 * @return sps and pps data
	 */
	public byte[] getSPSPPSData() {
		return SPSPPSData; 
	}
	/**
	 * set sps and pps data
	 * @param sPSPPSData sps and pps data
	 */
	public void setSPSPPSData(byte[] sPSPPSData) {
		SPSPPSData = sPSPPSData;
	}
	
//	public void setVideoDecodeType(String videoDecodeType) {
//		this.videoDecodeType = videoDecodeType;
//	}
	
	public void setVideoW(int videoW) {
		this.videoW = videoW;
	}
	
	public void setVideoH(int videoH) {
		this.videoH = videoH;
	}
	
	public void setVideoFrameRate(int videoFrameRate) {
		this.videoFrameRate = videoFrameRate;
	}
	
	public void setVideoBitRate(int videoBitRate) {
		this.videoBitRate = videoBitRate;
	}
	
	public void setVideoDecodeTypeE(TSEDecodeType videoDecodeTypeE) {
		this.videoDecodeType = videoDecodeTypeE;
	}
}
